﻿<Window x:Class="HM.UI.Windows.PaymentsReportWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Payments Report" SizeToContent="WidthAndHeight">
    <Grid>
        <DataGrid Margin="5" AutoGenerateColumns="False" ItemsSource="{Binding Payments}" IsReadOnly="True"  Visibility="{Binding AllPaymentsDataGrid}">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding PaymentDate, StringFormat={}{0:MMMM yyyy}}" Header="Payment Date" />
                <DataGridTextColumn Binding="{Binding Amount}" Header="Amount" />
                <DataGridTextColumn Binding="{Binding Tenant.Name}" Header="Tenant" />
            </DataGrid.Columns>
        </DataGrid>
        <DataGrid Margin="5" AutoGenerateColumns="False" ItemsSource="{Binding Payments}" IsReadOnly="True" Visibility="{Binding OneTenantDataGrid}">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding PaymentDate, StringFormat={}{0:MMMM yyyy}}" Header="Payment Date" />
                <DataGridTextColumn Binding="{Binding Amount}" Header="Amount" />
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
